public class Work02 {

    private static int count;
    private static int[] fibNum = new int[25];


    public static int fib(int n){
        count++;
        if(n == 1||n==2){
            fibNum[n] = 1;
        }
        if (fibNum[n] != 0){
            return fibNum[n];
        }else{
           return fibNum[n] = fib(n-1) + fib(n -2);
        }
    }

    public static void main(String[] args) {
        fib(20);
    }
}
